Ext.define('AmpleHarvest.util.cExporter',
		{

			exportPost				: function(url, content)
			{
				var method, form, hiddenField;

				method = 'POST';
				form = document.createElement('form');
				form.setAttribute('method', method);
				form.setAttribute('action', url);

				hiddenField = document.createElement('input');
				hiddenField.setAttribute('type', 'hidden');
				hiddenField.setAttribute('name', 'content');
				hiddenField.setAttribute('value', content);
				form.appendChild(hiddenField);

				document.body.appendChild(form);
				form.submit();
				document.body.removeChild(form);
			},

			exportPostWithParams	: function(url, params, bool_NewWin)
			{
				var  obj_Form, hiddenField, key, subKey;

				obj_Form = document.createElement('form');
				obj_Form.setAttribute('method', 'POST');
				obj_Form.setAttribute('action', url);
				if (bool_NewWin)
				{
					obj_Form.setAttribute('target', "_blank");
				}

				for (key in params)
				{
					if (params.hasOwnProperty(key))
					{
						if (key instanceof Array)
						{
							for (subKey in key)
							{
								if (key.hasOwnProperty(subKey))
								{
									hiddenField = document
											.createElement('input');
									hiddenField.setAttribute('type', 'hidden');
									hiddenField.setAttribute('name', subKey);
									hiddenField.setAttribute('value',
											key[subKey]
									);
									obj_Form.appendChild(hiddenField);
								}
							}

						}
						else
						{
							hiddenField = document.createElement('input');
							hiddenField.setAttribute('type', 'hidden');
							hiddenField.setAttribute('name', key);
							hiddenField.setAttribute('value', params[key]);
							obj_Form.appendChild(hiddenField);
						}
					}

				}

				document.body.appendChild(obj_Form);
				obj_Form.submit();
				document.body.removeChild(obj_Form);
			}
		});